/*    */ package com.icity.config;
/*    */ 
/*    */ import java.nio.charset.Charset;
/*    */ import java.util.List;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.http.converter.HttpMessageConverter;
/*    */ import org.springframework.http.converter.StringHttpMessageConverter;
/*    */ import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
/*    */ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/*    */ 
/*    */ 
/*    */ 
/*    */ @Configuration
/*    */ public class EncodingConfig
/*    */   extends WebMvcConfigurerAdapter
/*    */ {
/* 19 */   private static final Logger logger = Logger.getLogger(EncodingConfig.class);
/*    */   
/*    */   @Bean
/* 22 */   public HttpMessageConverter<String> responseBodyConverter() { StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
/* 23 */     logger.info("*************************Encoding UTF-8**************************");
/* 24 */     return converter;
/*    */   }
/*    */   
/*    */ 
/*    */   public void configureMessageConverters(List<HttpMessageConverter<?>> converters)
/*    */   {
/* 30 */     super.configureMessageConverters(converters);
/* 31 */     converters.add(responseBodyConverter());
/*    */   }
/*    */   
/*    */ 
/*    */   public void configureContentNegotiation(ContentNegotiationConfigurer configurer)
/*    */   {
/* 37 */     configurer.favorPathExtension(false);
/*    */   }
/*    */ }


/* Location:              /Users/apple/Desktop/需求/block/interface/blockchain_interface.jar!/BOOT-INF/classes/com/icity/config/EncodingConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       0.7.1
 */